package com.iplant.wms.service.basicenum.wms;


import com.iplant.base.po.enums.BaseEnum;

/**
 * 入库/出库类型
 *
 * @author YouWang·Peng
 * 2022-9-24 11:28:13
 */
public enum WMSStockRecordType implements BaseEnum {
    /**
     * 默认 无须处理
     */
    Default(0, "默认"),

    /**
     * 一般入库
     */
    GeneralWarehousing(1, "一般入库","GIS"),
    /**
     * 一般出库
     */
    GeneralOutOfStock(2, "一般出库","GOS"),
    /**
     * 生产入库  半成品入库/成品入库
     */
    ProductionWarehousing(3, "生产入库","POS"),

    /**
     * 生产出库  配料 半成品出库
     */
    ProductionOutOfStock(4, "生产出库","WOS"),
    /**
     * 采购入库
     */
    ProcurementAndWarehousing(5, "采购入库","PIS"),

    /**
     * 销售出库
     */
    SalesOutOfStock(6, "销售出库","OBO"),
    /**
     * 移库入库
     */
    StockShiftIn(7, "移库入库","RIS"),

    /**
     * 移库出库
     */
    StockShiftOut(8, "移库出库","ROS"),
    /**
     * 解冻
     */
    UnBlockedStock(9, "解冻","JDS"),

    /**
     * 冻结
     */
    BlockedStock(10, "冻结","DJS"),
    /**
     * 盘盈
     */
    InventoryProfit(11, "盘盈","PYS"),

    /**
     * 盘亏
     */
    InventoryLoss(12, "盘亏","PKS"),
    /**
     * 生产入库  半成品入库/成品入库
     */
    ProductionReturnWarehousing(13, "生产退料","POS"),

    /**
     * 生产出库  配料 半成品出库
     */
    ProductionFeedOutOfStock(14, "生产补料","WOS");

    private int value;
    private String label;
    private String remark = "";

    WMSStockRecordType(int value, String label) {
        this.value = value;
        this.label = label;
    }
    WMSStockRecordType(int value, String label,String remark) {
        this.value = value;
        this.label = label;
        this.remark = remark;
    }

    public static WMSStockRecordType getEnumType(int val) {
        for (WMSStockRecordType type : WMSStockRecordType.values()) {
            if (type.getValue() == val) {
                return type;
            }
        }
        return null;
    }

    @Override
    public int getValue() {
        return value;
    }

    @Override
    public void setValue(int value) {
        this.value = value;
    }

    @Override
    public String getLabel() {
        return label;
    }

    @Override
    public void setLabel(String label) {
        this.label = label;
    }

    @Override
    public String getRemark() {
        return remark;
    }

    @Override
    public void setRemark(String remark) {
        this.remark = remark;
    }
}
